home *** CD-ROM | disk | FTP | other *** search
/ Die Ultimative Software-P…i Collection 1996 & 1997 / Die Ultimative Software-Pakete CD-ROM fur Atari Collection 1996 & 1997.iso / p / pov / povlisti.ngs / them!.pov < prev    next >
Encoding:
Text File  |  1992-10-25  |  15.4 KB  |  463 lines

  1. // Persistence of Vision Raytracer
  2. // Them!  They're in your dreams.  They're in your town. They're even in 
  3. // your pumpkins! It's Them!  By Douglas Otwell
  4. // The tentacle was modeled with Robert Flores' Worm v0.4 
  5. //   and Truman Brown's CTDS.
  6. // The small gourd was modeled with Truman Brown's CircleMaster, Hype,
  7. //   and TTG.
  8. // The pumpkin stem was done with my own Swoop.
  9.  
  10. #include "colors.inc"
  11. #include "shapes.inc"
  12. #include "textures.inc"
  13. #include "arm1.inc"
  14. #include "arm2.inc"
  15. #include "gourd.inc"
  16. #include "gourd2.inc"
  17.  
  18. //----------------------------------------------------------------------------
  19. // Lights, camera ....
  20. //----------------------------------------------------------------------------
  21. camera {
  22.    location  <-4.0  9.0  -36.0>
  23.    direction <0.0 0.0  2.0>
  24.    up        <0.0  1.0  0.0>
  25.    right     <1.33333 0.0 0.0>
  26.    look_at   <2.0 1.0 0.0>
  27. }
  28.  
  29. object {light_source {<0 10 -35> color White}}
  30.  
  31. object {light_source {<-12 10 2> color White}}
  32. //----------------------------------------------------------------------------
  33. // pumpkinoid (difference)
  34. //
  35. // description: One segment of the pumpkin shell
  36. //----------------------------------------------------------------------------
  37. #declare pumpkinoid = difference {
  38.    quadric {Ellipsoid scale <2 5 4>}
  39.    quadric {Ellipsoid scale <2 4.8 3.8>}
  40. }
  41.  
  42. //----------------------------------------------------------------------------
  43. // pumpkin_shell (object)
  44. //
  45. // description: Orange wrinkly pumpkin shell of hollowed ellipsoids
  46. //    contains: pumpkinoid
  47. //----------------------------------------------------------------------------
  48. #declare shell_texture = texture {
  49.    color Orange
  50.    phong 0.5
  51.    wrinkles 0.4
  52.    scale <0.4 0.4 0.4>
  53. }
  54.  
  55. #declare pumpkin_shell = object {
  56.    difference {
  57.       union {
  58.          difference {pumpkinoid translate <0 0 -3> rotate <0 0 0>}
  59.          difference {pumpkinoid translate <0 0 -3> rotate <0 15 0>}
  60.          difference {pumpkinoid translate <0 0 -3> rotate <0 30 0>}
  61.          difference {pumpkinoid translate <0 0 -3> rotate <0 45 0>}
  62.          difference {pumpkinoid translate <0 0 -3> rotate <0 60 0>}
  63.          difference {pumpkinoid translate <0 0 -3> rotate <0 75 0>}
  64.          difference {pumpkinoid translate <0 0 -3> rotate <0 90 0>}
  65.          difference {pumpkinoid translate <0 0 -3> rotate <0 105 0>}
  66.          difference {pumpkinoid translate <0 0 -3> rotate <0 120 0>}
  67.          difference {pumpkinoid translate <0 0 -3> rotate <0 135 0>}
  68.          difference {pumpkinoid translate <0 0 -3> rotate <0 150 0>}
  69.          difference {pumpkinoid translate <0 0 -3> rotate <0 165 0>}
  70.          difference {pumpkinoid translate <0 0 -3> rotate <0 180 0>}
  71.          difference {pumpkinoid translate <0 0 -3> rotate <0 -15 0>}
  72.          difference {pumpkinoid translate <0 0 -3> rotate <0 -30 0>}
  73.          difference {pumpkinoid translate <0 0 -3> rotate <0 -45 0>}
  74.          difference {pumpkinoid translate <0 0 -3> rotate <0 -60 0>}
  75.          difference {pumpkinoid translate <0 0 -3> rotate <0 -75 0>}
  76.          difference {pumpkinoid translate <0 0 -3> rotate <0 -90 0>}
  77.          difference {pumpkinoid translate <0 0 -3> rotate <0 -105 0>}
  78.          difference {pumpkinoid translate <0 0 -3> rotate <0 -120 0>}
  79.          difference {pumpkinoid translate <0 0 -3> rotate <0 -135 0>}
  80.          difference {pumpkinoid translate <0 0 -3> rotate <0 -150 0>}
  81.          difference {pumpkinoid translate <0 0 -3> rotate <0 -165 0>}
  82.       }
  83.       quadric {Ellipsoid scale <6.5 4.5 6.5>}
  84.       //Eye
  85.       intersection {
  86.          plane {<0 1 0> -1.05 inverse}
  87.          plane {<0 1 0> -1.05 inverse rotate <0 0 120> }
  88.          plane {<0 1 0> -1.05 inverse rotate <0 0 240> }
  89.          plane {<0 0 1> 0}
  90.          rotate <30 20 0>
  91.       }
  92.       // Grin
  93.       union {
  94.          box {<0 0 -20> <1.5 3 0> 
  95.             rotate <0 0 45>
  96.             translate <1.061 0 0>
  97.             rotate <-20 -15 0>
  98.          }
  99.          intersection {
  100.             plane {<0 1 0> 0 inverse}
  101.             plane {<0 1 0> 0 inverse rotate <0 0 90>}
  102.             plane {<0 1 0> 0 rotate <0 0 70> translate <-1.5 0 0>}
  103.             plane {<0 0 1> 0}
  104.             rotate <0 0 -45>
  105.             translate <1.061 0 0>
  106.             rotate <-20 -15 0>
  107.          }
  108.          box {<-1.5 0 -20> <0 3 0> 
  109.             rotate <0 0 -45>
  110.             translate <-1.061 0 0>
  111.             rotate <-20 -15 0>
  112.          }
  113.          intersection {
  114.             plane {<0 1 0> 0 inverse}
  115.             plane {<0 1 0> 0 rotate <0 0 90>}
  116.             plane {<0 1 0> 0 rotate <0 0 -70> translate <1.5 0 0>}
  117.             plane {<0 0 1> 0}
  118.             rotate <0 0 45>
  119.             translate <-1.061 0 0>
  120.             rotate <-20 -15 0>
  121.          }
  122.          translate <0 -2.061 0>
  123.          scale <1.04 1.04 1.04>
  124.          translate <0 2.061 0>
  125.       }
  126.    }
  127.    texture {shell_texture}
  128.    bounded_by {sphere {<0 0 0> 7}}
  129. }
  130.  
  131. //----------------------------------------------------------------------------
  132. // pumpkin_inside (object)
  133. //
  134. // description: Yellow meaty inside
  135. //----------------------------------------------------------------------------
  136. #declare pumpkin_inside = object {
  137.    difference {
  138.       union {
  139.          quadric {Ellipsoid scale <1.9 4.9 3.9> translate <0 0 -3> rotate <0 0 0>}
  140.          quadric {Ellipsoid scale <1.9 4.9 3.9> translate <0 0 -3> rotate <0 15 0>}
  141.          quadric {Ellipsoid scale <1.9 4.9 3.9> translate <0 0 -3> rotate <0 30 0>}
  142.          quadric {Ellipsoid scale <1.9 4.9 3.9> translate <0 0 -3> rotate <0 45 0>}
  143.          quadric {Ellipsoid scale <1.9 4.9 3.9> translate <0 0 -3> rotate <0 60 0>}
  144.          quadric {Ellipsoid scale <1.9 4.9 3.9> translate <0 0 -3> rotate <0 75 0>}
  145.          quadric {Ellipsoid scale <1.9 4.9 3.9> translate <0 0 -3> rotate <0 90 0>}
  146.          quadric {Ellipsoid scale <1.9 4.9 3.9> translate <0 0 -3> rotate <0 105 0>}
  147.          quadric {Ellipsoid scale <1.9 4.9 3.9> translate <0 0 -3> rotate <0 120 0>}
  148.          quadric {Ellipsoid scale <1.9 4.9 3.9> translate <0 0 -3> rotate <0 135 0>}
  149.          quadric {Ellipsoid scale <1.9 4.9 3.9> translate <0 0 -3> rotate <0 150 0>}
  150.          quadric {Ellipsoid scale <1.9 4.9 3.9> translate <0 0 -3> rotate <0 165 0>}
  151.          quadric {Ellipsoid scale <1.9 4.9 3.9> translate <0 0 -3> rotate <0 180 0>}
  152.          quadric {Ellipsoid scale <1.9 4.9 3.9> translate <0 0 -3> rotate <0 -15 0>}
  153.          quadric {Ellipsoid scale <1.9 4.9 3.9> translate <0 0 -3> rotate <0 -30 0>}
  154.          quadric {Ellipsoid scale <1.9 4.9 3.9> translate <0 0 -3> rotate <0 -45 0>}
  155.          quadric {Ellipsoid scale <1.9 4.9 3.9> translate <0 0 -3> rotate <0 -60 0>}
  156.          quadric {Ellipsoid scale <1.9 4.9 3.9> translate <0 0 -3> rotate <0 -75 0>}
  157.          quadric {Ellipsoid scale <1.9 4.9 3.9> translate <0 0 -3> rotate <0 -90 0>}
  158.          quadric {Ellipsoid scale <1.9 4.9 3.9> translate <0 0 -3> rotate <0 -105 0>}
  159.          quadric {Ellipsoid scale <1.9 4.9 3.9> translate <0 0 -3> rotate <0 -120 0>}
  160.          quadric {Ellipsoid scale <1.9 4.9 3.9> translate <0 0 -3> rotate <0 -135 0>}
  161.          quadric {Ellipsoid scale <1.9 4.9 3.9> translate <0 0 -3> rotate <0 -150 0>}
  162.          quadric {Ellipsoid scale <1.9 4.9 3.9> translate <0 0 -3> rotate <0 -165 0>}
  163.       }
  164.       quadric {Ellipsoid scale <6.25 4.25 6.25>}
  165.       //Eye
  166.       intersection {
  167.          plane {<0 1 0> -1 inverse}
  168.          plane {<0 1 0> -1 inverse rotate <0 0 120> }
  169.          plane {<0 1 0> -1 inverse rotate <0 0 240> }
  170.          plane {<0 0 1> 0}
  171.          rotate <30 20 0>
  172.       }
  173.       // Grin
  174.       box {<0 0 -20> <1.5 3 0> 
  175.          rotate <0 0 45>
  176.          translate <1.061 0 0>
  177.          rotate <-20 -15 0>
  178.       }
  179.       intersection {
  180.          plane {<0 1 0> 0 inverse}
  181.          plane {<0 1 0> 0 inverse rotate <0 0 90>}
  182.          plane {<0 1 0> 0 rotate <0 0 70> translate <-1.5 0 0>}
  183.          plane {<0 0 1> 0}
  184.          rotate <0 0 -45>
  185.          translate <1.061 0 0>
  186.          rotate <-20 -15 0>
  187.       }
  188.       box {<-1.5 0 -20> <0 3 0> 
  189.          rotate <0 0 -45>
  190.          translate <-1.061 0 0>
  191.          rotate <-20 -15 0>
  192.       }
  193.       intersection {
  194.          plane {<0 1 0> 0 inverse}
  195.          plane {<0 1 0> 0 rotate <0 0 90>}
  196.          plane {<0 1 0> 0 rotate <0 0 -70> translate <1.5 0 0>}
  197.          plane {<0 0 1> 0}
  198.          rotate <0 0 45>
  199.          translate <-1.061 0 0>
  200.          rotate <-20 -15 0>
  201.       }
  202.    }
  203.    texture {
  204.       color red 1.0 green 0.85 blue 0.5
  205.       phong 1
  206.       wrinkles 0.5
  207.       scale <1 1 1>
  208.    }
  209.    bounded_by {sphere {<0 0 0> 7}}
  210. }
  211.    
  212.    
  213. //----------------------------------------------------------------------------
  214. // stem (composite)
  215. //
  216. // description: pumpkin stem created with Swoop
  217. //----------------------------------------------------------------------------
  218. #declare stem_texture = texture { 0.2
  219.    color Tan 
  220. }
  221.  
  222. #declare stem_side1_C1 =  texture {stem_texture}
  223. #declare stem_side3_C1 =  texture {stem_texture}
  224. #declare stem_side5_C1 =  texture {stem_texture}
  225. #declare stem_side7_C1 =  texture {stem_texture}
  226. #declare stem_side9_C1 =  texture {stem_texture}
  227. #declare stem_side11_C1 = texture {stem_texture}
  228. #declare stem_side13_C1 = texture {stem_texture}
  229. #declare stem_side15_C1 = texture {stem_texture}
  230.  
  231. #declare stem = composite {  /* All Objects */
  232.    #include "stem.inc"
  233.    bounded_by {
  234.       box { <-0.5730 0.0000 -1.2000> <4.2000 3.4271 1.2000> }
  235.    }
  236.    translate <-3 0 0>
  237. }
  238.  
  239. //----------------------------------------------------------------------------
  240. // pumpkin (object)
  241. //
  242. // description: A grinning pumpkin in the process of being carved
  243. //    contains: pumpkin_shell, pumpkin_inside, stem
  244. //----------------------------------------------------------------------------
  245. #declare pumpkin = composite {
  246.    object {pumpkin_shell}
  247.    object {pumpkin_inside}
  248.    composite {stem translate <0 4 0> rotate <0 150 0>} 
  249. }
  250.  
  251. //----------------------------------------------------------------------------
  252. // handle (object)
  253. //
  254. // description: Black bakelite knife handle
  255. //----------------------------------------------------------------------------
  256. #declare handle = object {
  257.    union {
  258.       intersection {
  259.          box {<0 -0.7 -0.45> <5 0.7 -0.05>}
  260.          plane {<0 1 0> 0 rotate <-30 0 0> translate <0 0.7 0>}
  261.          plane {<0 1 0> 0 inverse rotate <30 0 0> translate <0 -0.7 0>}
  262.          plane {<0 0 1> 0 inverse rotate <0 30 0>}
  263.       }
  264.       intersection {
  265.          intersection {Cone_Y translate <0 1 0> scale <0.7 0.7 0.7>}
  266.          plane {<0 1 0> 0.4 }
  267.          rotate <-90 0 0>
  268.          translate <5 0 -0.05>
  269.       }
  270.    }
  271.    texture {color Gray20 phong 0.5 phong_size 8}
  272.    translate <0 0 0>
  273. }
  274.  
  275. //----------------------------------------------------------------------------
  276. // blade (object)
  277. //
  278. // description: Stainless steel blade, tang and rivets   
  279. //----------------------------------------------------------------------------
  280. #declare blade = object {
  281.    union {
  282.       // blade
  283.       intersection {
  284.          intersection {Disk_Z scale <20 20 0.05> translate <0 18.5 0>}
  285.          quadric {
  286.             QCone_Z 
  287.             translate <0 0 -1>
  288.             scale <20 20 1.5>
  289.             translate <0 18.5 0>
  290.          }
  291.          quadric {
  292.             QCone_Z 
  293.             translate <0 0 1>
  294.             scale <20 20 1.5>
  295.             translate <0 18.5 0>
  296.          }
  297.          plane {<0 1 0> 0.7}
  298.          plane {<1 0 0> 0.5}
  299.          
  300.       }
  301.       // tang
  302.       box {<0 -0.7 -0.05> <5 0.7 0.05>}
  303.       intersection {Disk_Z scale <0.7 0.7 0.05> translate <5 0 0>}
  304.       // rivets
  305.       intersection {Disk_Z scale <0.3 0.3 0.451> translate <2 0 0>}
  306.       intersection {Disk_Z scale <0.3 0.3 0.451> translate <4 0 0>}
  307.    }
  308.    texture {Chrome_Texture}
  309. }
  310.  
  311. //----------------------------------------------------------------------------
  312. // knife (composite)
  313. //
  314. // description: Chef's knife, perfect for carving pumpkins and other things...
  315. //    contains: handle, blade
  316. //----------------------------------------------------------------------------
  317. #declare knife = composite {
  318.    object {handle}
  319.    object {handle rotate <180 0 0>} 
  320.    object {blade}
  321.    bounded_by {box {<-12 -1.5 -0.5> <7 1.5 0.5>}}
  322. }
  323.  
  324. //----------------------------------------------------------------------------
  325. // gourd (composite)
  326. //
  327. // description: Gourd modeled with Truman Brown's suite of utilities
  328. //----------------------------------------------------------------------------
  329. #declare gourd_texture = texture {
  330.    leopard
  331.    turbulence 0.9
  332.    color_map {
  333.       [0.0  0.01  color HuntersGreen color HuntersGreen]
  334.       [0.01 0.4   color HuntersGreen color White]
  335.       [0.4  1.001 color White color White]
  336.    }
  337.    scale <0.2 0.8 0.2>
  338. }
  339. texture {
  340.    gradient <0 1 0>
  341.    color_map {
  342.       [0.0 0.5 color Clear color Clear]
  343.       [0.50 0.65 color Orange alpha 0.6 color Orange]
  344.       [0.55 1.001 color Orange color Orange]
  345.    }
  346.    phong 0.5
  347.    phong_size 10
  348.    scale <24 24 24>
  349.    translate <0 -12 0>
  350. }
  351.  
  352. #declare gourd = composite {
  353.    object {
  354.       gourd
  355.       translate <0 2.8284 0>
  356.       texture {gourd_texture}
  357.    }
  358.    object {
  359.       gourd2
  360.       texture {gourd_texture}
  361.    }
  362.    object {
  363.       union {
  364.          intersection {
  365.             quartic {
  366.             <    1.000000 0.000000 0.000000 0.000000 2.000000
  367.                  0.000000 0.000000 2.000000 0.000000 -32.500000
  368.                  0.000000 0.000000 0.000000 0.000000 0.000000
  369.                  0.000000 0.000000 0.000000 0.000000 0.000000
  370.                  1.000000 0.000000 0.000000 2.000000 0.000000
  371.                  31.500000 0.000000 0.000000 0.000000 0.000000
  372.                  1.000000 0.000000 -32.500000 0.000000 248.062500 >
  373.                  rotate <90 0 0>
  374.             }
  375.             plane {<0 1 0> 0 inverse}
  376.             plane {<0 1 0> 0 inverse rotate <0 0 60>}
  377.          }
  378.          sphere {<0 0 0> 0.5 translate <4 0 0> rotate <0 0 60>}
  379.       }
  380.  
  381.       translate <0 4.2436 0>
  382.       texture {gourd_texture}
  383.       translate <4 0 0>
  384.    }
  385.    
  386. }
  387.  
  388. //----------------------------------------------------------------------------
  389. // The Scene
  390. //
  391. // description: A Jack'o'Lantern being carved by ... Them!  Velvet curtains 
  392. //    and table covering, and a small gourd complete the scene.
  393. //----------------------------------------------------------------------------
  394.  
  395.  
  396. // Wall
  397. object {
  398.    quadric {Cylinder_Y scale <72 72 72>}
  399.    texture {
  400.       bozo
  401.       turbulence 0.0
  402.       color_map {
  403.          [0.0 0.5  color Black color MidnightBlue ]
  404.          [0.5 0.8  color MidnightBlue color Black]
  405.          [0.8 1.01 color Black color Black]
  406.       }
  407.       ambient 0.5 diffuse 0.0
  408.       scale <6 100 6>
  409.    }
  410. }
  411. // Table
  412. object {
  413.    box {<-24 -1 -24> <12 0 12>}
  414.    texture {
  415.       bozo
  416.       turbulence 0.5
  417.       color_map {
  418.          [0.0 0.3  color Black color Scarlet]
  419.          [0.3 0.8  color Scarlet color Black]
  420.          [0.8 1.01 color Black color Black]
  421.       }
  422.       ambient 0.5 diffuse 0.0
  423.       scale <5 5 100>
  424.       rotate <0 45 0>
  425.    }
  426.    translate <0 -5 0>
  427. }
  428.  
  429. composite {pumpkin}
  430.  
  431. composite {
  432.    gourd 
  433.    scale <0.5 0.5 0.5>
  434.    rotate <90 -75 0>
  435.    translate <-5 -3.75 -7>
  436. }
  437.  
  438.  
  439. composite {
  440.    object {arm1}
  441.  
  442.    composite {
  443.       object {
  444.          arm2 
  445.          rotate <-90 0 0> 
  446.       }
  447.       composite {
  448.          knife
  449.          rotate <90 0 90>
  450.          translate <0 -2 0.9>
  451.       }
  452.       
  453.       rotate <0 0 -30>
  454.       translate <9 4.75 0>
  455.    }
  456.  
  457.    rotate <-90 0 0>
  458.    translate <0 0 -5>
  459.    rotate <30 20 0>
  460. }
  461.  
  462.  
  463.